//
//  ViewController.m
//  avplayer
//
//  Created by 谢汝 on 2017/12/15.
//  Copyright © 2017年 谢汝. All rights reserved.
//

#import "ViewController.h"
#import "XRPlayerViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    
    
}

- (IBAction)beginPlay:(id)sender {
    
    NSURL *url = [NSURL URLWithString:@"http://bos.nj.bpc.baidu.com/tieba-smallvideo/11772_3c435014fb2dd9a5fd56a57cc369f6a0.mp4"];
    XRVideoModel *model1 = [[XRVideoModel alloc] initWithName:@"海贼王德岛剪辑(在线)" url:url];
    
    NSURL *url2 = [NSURL fileURLWithPath:[[NSBundle mainBundle]pathForResource:@"海贼王精彩剪辑" ofType:@"mp4"]];
    XRVideoModel *model2 = [[XRVideoModel alloc] initWithName:@"海贼王精彩剪辑(本地)" url:url2];
    
    XRPlayerViewController *playVC = [[XRPlayerViewController alloc]initWithVideoList:@[model1,model2]];
    
    
    [self presentViewController:playVC animated:YES completion:^{
        
    }];
    
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
